# -*- coding: UTF-8 -*-

try:
    fh = open("test.txt","w")
    fh.write("this is  a test text")
except IOError:
    print "errof:not find the file"
else:
    print "内容写入 successful"
    fh.close()